<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>Swashbuckler Diary</title>
    <base />
    <script type="text/javascript">
        // Single Page Apps for GitHub Pages
        // MIT License
        // https://github.com/rafgraph/spa-github-pages
        // This script checks to see if a redirect is present in the query string,
        // converts it back into the correct url and adds it to the
        // browser's history using window.history.replaceState(...),
        // which won't cause the browser to attempt to load the new url.
        // When the single page app is loaded further down in this file,
        // the correct url will be waiting in the browser's history for
        // the single page app to route accordingly.
        (function (l) {
            if (l.search[1] === '/') {
                var decoded = l.search.slice(1).split('&').map(function (s) {
                    return s.replace(/~and~/g, '&')
                }).join('?');
                window.history.replaceState(null, null,
                    l.pathname.slice(0, -1) + decoded + l.hash
                );
            }
        }(window.location))
    </script>
    <script>
        var path = window.location.pathname.split('/');
        var base = document.getElementsByTagName('base')[0];
        if (window.location.host.includes('localhost')) {
            base.setAttribute('href', '/');
        } else if (path.length > 2) {
            base.setAttribute('href', '/' + path[1] + '/');
        } else if (path[path.length - 1].length != 0) {
            window.location.replace(window.location.origin + window.location.pathname + '/' + window.location.search);
        }
    </script>
    <script>
        (function () {
            var lang = localStorage.getItem('Language');

            if (lang) {
                document.documentElement.lang = lang;
            }
        }());
    </script>
    <link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
    <link href="manifest.webmanifest" rel="manifest" />
    <link rel="apple-touch-icon" sizes="512x512" href="icon-512.png" />
    <link rel="apple-touch-icon" sizes="192x192" href="icon-192.png" />

    <link href="_content/Masa.Blazor/css/masa-blazor.min.css" rel="stylesheet">

    <link href="_content/SwashbucklerDiary.Rcl/css/materialdesign/v7.2.96/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="_content/SwashbucklerDiary.Rcl/npm/vditor/3.10.7/dist/index.css" rel="stylesheet" />
    <link href="_content/SwashbucklerDiary.Rcl/npm/swiper/7.4.1/swiper-bundle.min.css" rel="stylesheet" />

    <link href="_content/SwashbucklerDiary.Rcl/css/extend/masa-blazor-extend.css" rel="stylesheet" />
    <link href="_content/SwashbucklerDiary.Rcl/css/extend/vditor-extend.css" rel="stylesheet" />

    <link href="SwashbucklerDiary.WebAssembly.styles.css" rel="stylesheet" />
    <link href="_content/SwashbucklerDiary.Rcl/css/app.css" rel="stylesheet" />
    <link rel="stylesheet" href="css/app.css" />

</head>

<body>
    <div id="app">
        <div style="display: flex;align-items: center;justify-content: center;height: 100vh">
            <div class="loading-container">
                <span></span>
                <span></span>
                <span></span>
                <span></span>
                <span></span>
                <span></span>
                <span></span>
                <span></span>
                <span></span>
            </div>
        </div>
    </div>

    <div id="blazor-error-ui">
        An unhandled error has occurred.
        <a href="" class="reload" onclick="swSkipWaiting()">Reload</a>
        <a class="dismiss">🗙</a>
    </div>
    <script src="js/sw.js"></script>
    <script src="framework/blazor.webassembly.js" autostart="false"></script>
    <script src="_content/Masa.Blazor/js/masa-blazor.js"></script>
    <script src="_content/SwashbucklerDiary.Rcl/npm/vditor/3.10.7/dist/index.min.js"></script>
    <script src="_content/SwashbucklerDiary.Rcl/npm/swiper/7.4.1/swiper-bundle.min.js"></script>
    <script src="_content/SwashbucklerDiary.Rcl/npm/panzoom/9.4.3/panzoom.min.js"></script>
    <script src="_content/SwashbucklerDiary.Rcl/npm/html2canvas/1.4.1/dist/html2canvas.min.js"></script>
    <script src="_content/SwashbucklerDiary.Rcl/npm/wc-waterfall/0.1.3/dist/index.iife.min.js"></script>
    <script src="_content/SwashbucklerDiary.Rcl/npm/bettersearch/1.0.1/dist/index.umd.js"></script>
    <script src="_content/SwashbucklerDiary.Rcl/js/utility.js"></script>
    <script src="_content/SwashbucklerDiary.Rcl/js/vditor-icons.js"></script>
    <script src="_content/SwashbucklerDiary.Rcl/js/customEvents.js"></script>
    <script src="js/utility.js"></script>
    <script src="js/md5.umd.min.js"></script>
    <script src="js/fileSystem.js"></script>
    <script type="module">
        import { BrotliDecode } from './js/decode.min.js';
        Blazor.start({
            loadBootResource: function (type, name, defaultUri, integrity) {
                if (type !== 'dotnetjs' && location.hostname !== 'localhost' && type !== 'configuration') {
                    return (async function () {
                        const response = await fetch(defaultUri + '.br', { cache: 'no-cache' });
                        if (!response.ok) {
                            throw new Error(response.statusText);
                        }
                        const originalResponseBuffer = await response.arrayBuffer();
                        const originalResponseArray = new Int8Array(originalResponseBuffer);
                        const decompressedResponseArray = BrotliDecode(originalResponseArray);
                        const contentType = type ===
                            'dotnetwasm' ? 'application/wasm' : 'application/octet-stream';
                        return new Response(decompressedResponseArray,
                            { headers: { 'content-type': contentType } });
                    })();
                }
            }
        });
    </script>
</body>

</html>